<template>
  <div class="container">
    <data-view
      propViewKey="invoice_index"
      propViewForm="settlement/invoice/audit_detail.vue"
      :propIsTdesign="true"
      @after-load="afterLoad"
      ref="dataView"
      :propAutoFetchData="false"
    />
  </div>
</template>

<script>
export default {
  help: '开票单审核-列表',
  data() {
    return {
      idQuery: ''
    }
  },
  components: {
  },
  methods: {
    // 过滤显示按钮
    afterLoad() {
      if (this.idQuery) {
        this.$refs.dataView.viewRow(this.idQuery)
        this.idQuery = ''
      }
    },
    menuActiveCall() {
      if (this.$route.query && this.$route.query.id) {
        this.idQuery = this.$route.query.id
        const wrapper = this.$newWrapper().eq('id', this.idQuery)
        this.$refs.dataView.setQueryWrapperOnce(wrapper)
        return
      }
      let wrapper = this.$newWrapper()
      wrapper.eq('status', '1')
      this.$refs.dataView.setQueryWrapper(wrapper)
    }
  }
}
</script>
